import { get, post } from "./http"

//二次封装 调用接口
//--------------菜单管理----------------
//---菜单添加
export const menuAdd = (params) => post("/api/menuadd", params);
//---菜单列表
export const menuList = (params) => get("/api/menulist", params);
//---菜单获取
export const menuInfo = (params) => get("/api/menuinfo", params);
//---菜单修改
export const menuEdit = (params) => post("api/menuedit", params);
//---菜单删除
export const menuDelete=(params)=>post("/api/menudelete",params)
//--------------角色管理----------------
//---角色添加
export const roleAdd = (params) => post("/api/roleadd", params);
//---角色列表
export const roleList = () => get("/api/rolelist");
//---角色获取
export const roleInfo = (params) => get("/api/roleinfo", params);
//---角色修改
export const roleEdit = (params) => post("api/roleedit", params);
//---角色删除
export const roleDelete=(params)=>post("/api/roledelete",params)
//--------------管理员管理----------------
//---管理员添加
export const userAdd = (params) => post("/api/useradd", params);
//---管理员总数
export const userCount = () => get("/api/usercount");
//---管理员列表
export const userList = (params) => get("/api/userlist", params);
//---管理员获取（一条
export const userInfo = (params) => get("api/userinfo", params);
//---管理员修改
export const userEdit=(params)=>post("/api/useredit",params)
//---管理员删除
export const userDelete = (params) => post("/api/userdelete", params)
//---管理员登录
export const userLogin = (params) => post("/api/userlogin", params)
//--------------商品分类----------------
//---商品添加  （有文件）
export const cateAdd = (params) => post("/api/cateadd", params,true);
//---商品列表
export const cateList = (params) => get("/api/catelist",params);
//---商品获取
export const cateInfo = (params) => get("/api/cateinfo", params);
//---商品修改
export const cateEdit = (params) => post("api/cateedit", params,true);
//---商品删除
export const cateDelete = (params) => post("/api/catedelete", params)
//--------------商品规格管理----------------
//---商品规格添加
export const specsAdd = (params) => post("/api/specsadd", params);
//---商品规格总数
export const specsCount = (params) => get("/api/specscount",params);
//---商品规格列表
export const specsList = (params) => get("/api/specslist", params);
//---商品规格获取（一条
export const specsInfo = (params) => get("api/specsinfo", params);
//---商品规格修改
export const specsEdit=(params)=>post("/api/specsedit",params)
//---商品规格删除
export const specsDelete = (params) => post("/api/specsdelete", params)
//--------------商品管理----------------
//---商品添加
export const goodsAdd = (params) => post("/api/goodsadd", params,true);
//---商品总数
export const goodsCount = () => get("/api/goodscount");
//---商品列表
export const goodsList = (params) => get("/api/goodslist", params);
//---商品获取（一条
export const goodsInfo = (params) => get("api/goodsinfo", params);
//---商品修改
export const goodsEdit=(params)=>post("/api/goodsedit",params)
//---商品删除
export const goodsDelete = (params) => post("/api/goodsdelete", params)
//--------------会员管理----------------
//---会员添加=>移动端会员注册的接口
export const register = (params) => post("/api/register",params);
//---会员列表
export const memberList = () => get("/api/memberlist");
//---会员获取（一条
export const memberInfo = (params) => get("api/memberinfo", params);
//---会员修改
export const memberEdit = (params) => post("/api/memberedit", params)
//--------------轮播图管理----------------
//---轮播图添加  （有文件）
export const bannerAdd = (params) => post("/api/banneradd", params,true);
//---轮播图列表
export const bannerList = () => get("/api/bannerlist");
//---轮播图获取
export const bannerInfo = (params) => get("/api/bannerinfo", params);
//---轮播图修改
export const bannerEdit = (params) => post("api/banneredit", params,true);
//---轮播图删除
export const bannerDelete = (params) => post("/api/bannerdelete", params)
//--------------限时秒杀----------------
//---秒杀添加
export const seckAdd = (params) => post("/api/seckadd", params);
//---秒杀列表
export const seckList = () => get("/api/secklist");
//---秒杀获取（一条
export const seckInfo = (params) => get("api/seckinfo", params);
//---秒杀修改
export const seckEdit=(params)=>post("/api/seckedit",params)
//---秒杀删除
export const seckDelete = (params) => post("/api/seckdelete", params)